import {postRequest, getRequest} from '../../util/fetch';

export const getUserInfo = () =>
  postRequest('/mobile/account/getUserIntroduction.shtml');
export const getSampleStatus = data =>
  postRequest('/mobile/sample/getSampleStatus.shtml', {...data});
export const getSettings = () =>
  postRequest('/mobile/account/getAccountInformation.shtml');
export const sendFeedback = advise =>
  postRequest('/mobile/feedback.shtml', {advise});

//新添加的api

//我的首页面
export const getMineIndex = () => getRequest('/api/user/mineIndex.shtml');
//提交病例
export const createDiseaseHistory = data =>
  postRequest('/api/user/createDiseaseHistory.shtml', {...data});
//编辑个人简历
export const editMsg = data =>
  postRequest('/api/user/editMsg.shtml', {...data});
//判断相应的功能是否开启，1为提现，2为转赠，3为提现
export const sendTokenStart = data =>
  getRequest('/api/user/sendTokenStart.shtml', {...data});
//病例的列表
export const diseaseHistoryList = data =>
  getRequest('/api/user/diseaseHistoryList.shtml', {...data});
//删除病例
export const deleteDiseaseHistory = data =>
  postRequest('/api/user/deleteDiseaseHistory.shtml', {...data});
//得到用户充值记录
export const getRechargeList = () =>
  getRequest('/api/user/getRechargeList.shtml');
//用户信息，原来有一个接口
export const _getUserInfo = () => getRequest('/api/user/getUserInfo.shtml');
//得到用户的充值钱包
export const getWallet = () => getRequest('/api/user/getWallet.shtml');
//得到病例的详情
export const getDiseaseHistory = data =>
  getRequest('/api/user/getDiseaseHistory.shtml', {...data});
//修改病例
export const updataDiseaseHistory = data =>
  postRequest('/api/user/updateDiseaseHistory.shtml', {...data});
//提现功能
export const _addOrder = data =>
  postRequest('/api/order/addOrder.shtml', {...data});
//创建充值钱包
export const createWallet = () => postRequest('/api/user/createWallet.shtml');
//转赠
export const _sendToken = data =>
  postRequest('/api/send/sendToken.shtml', {...data});
//修改企业信息
export const editCompany = data =>
  postRequest('/api/user/editCompany.shtml', {...data});
//更新用户头像
export const _updataPicture = data =>
  postRequest('/mobile/account/headImgUpload.shtml', {...data});
//查看他人的信息
export const showOtherInfo = data =>
  getRequest('/api/user/getElseUserInfo.shtml', {...data});
